﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NJT.Services;
using NJT.ValueConverter;

namespace NJT.Test.Services
{
    [TestClass]
    public class 逆波兰test
    {


        [TestMethod]
        public void 逆波兰计算_test()
        {

            Assert.AreEqual("7", 逆波兰.计算("1+2 * 3"));

            Assert.AreEqual("7", 逆波兰.计算("(1+2)*3 - 2"));

            Assert.AreEqual("7", 逆波兰.计算("(21)/3 *1 ="));


            Assert.AreEqual("1024", 逆波兰.计算("2^10="));

        }

    }
}
